<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>任务列表</title>
    
	<link rel="stylesheet" type="text/css" href="css/commonStyle.css">
	
	<script type="text/javascript" src="dwr/engine.js" ></script>
	<script type="text/javascript" src="dwr/util.js" ></script>
	<script type="text/javascript" src="dwr/interface/missionAjax.js" ></script>
	<script type="text/javascript" src="js/Calendar.js" ></script>
	<script type="text/javascript" src="js/JQuery.js" ></script>
	<script type="text/javascript" src="lhgdialog/lhgdialog.min.js" ></script>
	<script type="text/javascript" src="js/missionList.js"></script>

  </head>
  
  <body>
    <table class="fullTableStyle">
    	<thead>
    		<tr class="theadNoTitle">
    			<td colspan="11">
    				<span>任务信息列表</span>
    				<a href="#" onclick="return showAddDialog()" >&cong;添加任务</a>
    			</td>
    		</tr>
    		<tr>
    			<td><input type="checkbox" onclick="checkAllMission(this)" /></td>
    			<td>任务ID</td>
    			<td>任务主题</td>
    			<td>客户名称</td>
    			<td>联系人</td>
    			<td>执行人</td>
    			<td>截止日期</td>
    			<td>优先级</td>
    			<td>详细信息</td>
    			<td>修改</td>
    			<td>删除</td>
    		</tr>
    	</thead>
    	<tbody>
    	<s:iterator value="missions" var="mission">
    		<tr>
    			<td><input type="checkbox" name="missionIds" value="<s:property value='#mission.id' />" /></td>
    			<td><s:property value="#mission.id" /></td>
    			<td><s:property value="#mission.theme" /></td>
    			<td><s:property value="#mission.customerInfo.name" /></td>
    			<td><s:property value="#mission.contact.name" /></td>
    			<td><s:property value="#mission.administrator.name" /></td>
    			<td><s:property value="#mission.time" /></td>
    			<td>
					<s:if test="#mission.precedence == 0">高</s:if>
					<s:elseif test="#mission.precedence == 1">中</s:elseif>
					<s:else>低</s:else>
				</td>
				<td><input type="button" style="background: url('img/detail.png');" class="showDetailStyle" onclick="showDetail(${mission.id})" /></td>
    			<td><input type="button" style="background: url('img/edit.png');" class="littleLogo" onclick="showUpdateDialog(${ mission.id })" /></td>
    			<td><input type="button" style="background: url('img/del.png');" class="littleLogo" onclick="delMission(${ mission.id })"></td>
    		</tr>
    	</s:iterator>
    	</tbody>
    	<tfoot>
    		<tr>
    			<td colspan="11">
    				<ul>
    					<!-- 页面记录数控制 -->
    					<li>
    						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;条/页
	    					<span class="countEveryPage">
				    			<a href="Mission_list.action?pageSize=10">10</a>
	    					</span>
		    				<span class="countEveryPage">
			    				<a href="Mission_list.action?pageSize=15">15</a>
		    				</span>
    					</li>
    					<!-- 页面记录数控制 -->
    					
    					<!-- 分页超链接 -->
		    			<li>
		    				<a href="Mission_list.action?pageNumber=${ page.pageCount }" >尾页</a>
		    			</li>
		    			<s:if test="page.hasNext">
			    			<li>
			    				<a href="Mission_list.action?pageNumber=${ page.pageNumber + 1 }" >下一页</a>
			    			</li>
		    			</s:if>
		    			<s:if test="page.hasPre">
			    			<li>
			    				<a href="Mission_list.action?pageNumber=${ page.pageNumber - 1 }" >上一页</a>
			    			</li>
		    			</s:if>
		    			<li>
		    				<a href="Mission_list.action?pageNumber=1" >首页</a>
		    			</li>
		    			<!-- 分页超链接 -->
		    			
		    			<!-- 页面信息显示 -->
		    			<li class="tfootContStyle"><input type="button" value="批量删除" onclick="return delSelectedMissions()" /></li>
    					<li class="tfootContStyle"><span>共&nbsp;<s:property value="page.pageCount" />&nbsp;页,&nbsp;<s:property value="page.recordCount" />&nbsp;条记录,这是第&nbsp;<s:property value="page.pageNumber" />&nbsp;页</span></li>
		    			<li class="tfootContStyle"><span>此页显示第&nbsp;<s:property value="page.beginIndex + 1" />&nbsp;条到第&nbsp;<s:property value="page.endIndex" />&nbsp;条记录</span></li>
		    			<!-- 页面信息显示 -->
		    		</ul>
    			</td>
    		</tr>
    	</tfoot>
    </table>
    <div style="margin-top: 10px; float: right;">
	    <a href="Mission_exportExcel.action" >导出为Excel文件</a>
	    <a href="Mission_exportExcelPage.action?pageNumber=${ page.pageNumber }" >导出当前页为Excel文件</a>
    </div>
  </body>
</html>
